﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="RefeicoesAbertasContratos.aspx.cs" Inherits="welwitschia.ServicoRefeicoes.RefeicoesAbertasContratos" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
      <div id="header" class="info">
            <h2>
                Vendas de refeições</h2>
            <div>
            </div>
        </div>
    <div>
        <asp:ListView runat="server" ID="lvContratos"  OnItemDeleting="lvContratos_ItemDeleting"
            OnItemEditing="lvContratos_ItemEditing" 
            OnItemCommand="lvContratos_ItemCommand">
            <LayoutTemplate>
                <table runat="server" class="grd2" id="table1">
                <thead>
                     <tr class="ghdr2">
                     <td>
                       <asp:Label ID="Label4" runat="server">Cliente</asp:Label>
                     </td>
                     <td>
                        <asp:Label ID="Label5" runat="server">Unidade Contrato</asp:Label>
                     </td>
                     <td>
                        <asp:Label ID="Label6" runat="server">Unidade</asp:Label>
                     </td>
                     <td>
                        <asp:Label ID="Label7" runat="server">Data Refeicao</asp:Label>
                     </td>
                     <td>
                        &nbsp;
                     </td>
                     </tr>
                </thead>
                <tr runat="server" id="itemPlaceholder">
                </tr>
            </table>
            </LayoutTemplate>
            <ItemTemplate>
                <tr id="Tr1" class='grd2<%#Container.DataItemIndex % 2 %>'>
                    <td id="Td1" runat="server">
                        <%-- Data-bound content. --%>
                        <asp:Label ID="Label1" runat="server" Text='<%#Eval("Nome") %>' />
                    </td>
                    <td id="Td6" runat="server">
                        <%-- Data-bound content. --%>
                        <asp:Label ID="lblCliente" runat="server" Text='<%#Eval("UnidadeContrato") %>' />
                    </td>
                    <td id="Td2" runat="server">
                        <%-- Data-bound content. --%>
                        <asp:Label ID="Label2" runat="server" Text='<%#Eval("Unidade") %>' />
                    </td>
                    <td id="Td7" runat="server">
                        <%-- Data-bound content. --%>
                        <asp:Label ID="Label4" runat="server" Text='<%#Eval("datarefeicao", "{0:dd/MM/yyyy}") %>' />
                    </td>
                    <td id="Td3" runat="server">
                        <%-- Data-bound content. --%>
                        <asp:LinkButton ID="EditButton" CommandName="Edit" CommandArgument='<%# Eval("idunidade") + ";" + Eval("datarefeicao") %>'
                            runat="server" Text="Editar"></asp:LinkButton>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:ListView>
        <div class="pagination-clean">
            <asp:DataPager ID="dplvContratos" runat="server" PagedControlID="lvContratos"
                PageSize="20">
                <Fields>
                    <asp:NextPreviousPagerField ButtonCssClass="command" FirstPageText="« Anterior" PreviousPageText="« Anterior"
                        RenderDisabledButtonsAsLabels="false" ShowFirstPageButton="false" ShowPreviousPageButton="true"
                        ShowLastPageButton="false" ShowNextPageButton="false" RenderNonBreakingSpacesBetweenControls="False" />
                    <asp:NumericPagerField CurrentPageLabelCssClass="current" NextPreviousButtonCssClass="next"
                        RenderNonBreakingSpacesBetweenControls="False" />
                    <asp:NextPreviousPagerField ButtonCssClass="command" LastPageText="›" NextPageText="Seguinte »"
                        RenderDisabledButtonsAsLabels="false" ShowFirstPageButton="false" ShowPreviousPageButton="false"
                        ShowLastPageButton="false" ShowNextPageButton="true" RenderNonBreakingSpacesBetweenControls="False" />
                </Fields>
            </asp:DataPager>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="LeftColumnContent" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="RightColumnContent" runat="server">
</asp:Content>
